package com.kgc.novel.domain.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiParam;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author mac
 * 小说内容
 */
@Getter
@Setter
@NoArgsConstructor
public class BookContentVO implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id",type = IdType.ASSIGN_ID)
    private String id;

    /**
     * 章节
     */
    @TableField("chapter")
    private String chapter;
    /**
     * 书本编号
     */
    @TableField("book_id")
    private String bookId;

    /**
     * 书本标题
     */
    @TableField("book_name")
    private String bookName;

    /**
     * 书本内容
     */
    @TableField("content")
    private String content;

    /**
     * 状态(0免费，1收费)
     */
    @TableField("status")
    private Byte status;

    /**
     * 创建时间
     */
    @ApiParam("创建时间")
    @TableField("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField("update_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
}
